<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns: xmlns:
      xmlns:>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
   <div id="div">
       <button v-on:click="getInfo">获取信息</button>
       {{info}}
       <br>
       <button v-on:click="addInfo('A',$event)">添加信息</button>
       {{msg}}
       <br>
       <a href="http://www.qq.com" v-on:click.prevent="lianJie">链接</a>
       <br>
       <input type="text" v-model="text_val" v-on:click.enter="showInfo">

       <button @click.ctrl="onClock">点击加ctrl</button>

   </div>
</body>
<script>
   var vue = new Vue({
       el:"#div",
       data:{
           info:1,
           msg:'A',
           text_val:""
       },
       methods:{
           getInfo:function () {
              this.info = this.info+1;
           },
           addInfo:function (msg,event) {
               this.msg = this.msg + msg;
               console.log(event);
           },
           lianJie:function () {
               console.log("1");
           },
           showInfo:function () {
               console.log(this.text_val);
           },
           onClock:function () {
               console.log("OK");
           }
       }
   });

</script>
</html>